<?php

namespace IMT\PluginBundle\Models;

use Symfony\Component\HttpFoundation\Request;

use Symfony\Bundle\TwigBundle\TwigEngine;

use Symfony\Component\Security\Acl\Model\AclProviderInterface;
use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
use Symfony\Component\Security\Acl\Permission\MaskBuilder;

abstract class PluginManager implements PluginManagerInterface
{
    // Services ...
	protected $aclProvider;
	protected $securityContext;
	protected $request;
	protected $templating;
	
    /**
     * Constructor.
     */
    public function __construct(AclProviderInterface $aclProvider, SecurityContext $securityContext, Request $request, TwigEngine $templating)
    {
    	$this->aclProvider = $aclProvider;
    	$this->securityContext = $securityContext;
    	$this->request = $request;
    	$this->templating = $templating;
    }
	
    /**
     * {@inheritDoc}
     */
    public function createPlugin()
    {
    	$class = $this->getClass();
    	$plugin = new $class;
    
    	return $plugin;
    }
     
}